Revert "merged master"
[lhc/web/wiklou.git] / tests / phpunit / includes / db / DatabaseSQLTest.php
index 0df5a46..d56e632 100644 (file)
@@ -16,9 +16,9 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        }
 
        /**
-        * @dataProvider dataSelectSQLText
+        * @dataProvider dataSQL
         */
-       function testSelectSQLText( $sql, $sqlText ) {
+       function testSQL( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->db->selectSQLText(
                        isset( $sql['tables'] ) ? $sql['tables'] : array(),
                        isset( $sql['fields'] ) ? $sql['fields'] : array(),
@@ -29,7 +29,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                ) ), $sqlText );
        }
 
-       function dataSelectSQLText() {
+       function dataSQL() {
                return array(
                        array(
                                array(
@@ -72,36 +72,4 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                        ),
                );
        }
-
-       /**
-        * @dataProvider dataConditional
-        */
-       function testConditional( $sql, $sqlText ) {
-               $this->assertEquals( trim( $this->db->conditional(
-                       $sql['conds'],
-                       $sql['true'],
-                       $sql['false']
-               ) ), $sqlText );
-       }
-
-       function dataConditional() {
-               return array(
-                       array(
-                               array(
-                                       'conds' => array( 'field' => 'text' ),
-                                       'true' => 1,
-                                       'false' => 'NULL',
-                               ),
-                               "(CASE WHEN field = 'text' THEN 1 ELSE NULL END)"
-                       ),
-                       array(
-                               array(
-                                       'conds' => 'field=1',
-                                       'true' => 1,
-                                       'false' => 'NULL',
-                               ),
-                               "(CASE WHEN field=1 THEN 1 ELSE NULL END)"
-                       ),
-               );
-       }
 }
\ No newline at end of file